﻿using Leeder.Business;
using NewAndong.Model;
using NewAndong.Service;
using System.Collections.Generic;

namespace NewAndong.Business
{

    public class DirectQuoteBLL : BaseBLL<DirectQuoteModel, DirectQuoteService>
    {
        public DirectQuoteBLL()
        {
            Service = new DirectQuoteService();
        }

        public List<DirectQuoteModel> GetModelList()
        {
            return Service.Query().ActivedObj;
        }

        public List<DirectQuoteModel> GetModelByName(string  name)
        {
            var result = Service.Query(p => p.DirectName == name);
            if (!result.IsSuccess)
            {
                LogObj.Error(result.Dsca);
                return new List<DirectQuoteModel>();
            }
            return result.ActivedObj;
        }
    }
}
